<div class="span10" id="_content" style="background: #fff;margin-left: 2px">
<table width="100%" style="margin: 0;padding: 0;">
    <tr>
        <td class="hzbar"></td>
        <td style="padding: 10px 15px;"><?php echo $this->session->flashdata('_message'); ?>
<!-- Modal Form -->
<?php echo $action; ?>
<?php echo anchor('administrator/user/index/create','<i class="icon-plus"></i>Add new user','class="btn"'); ?>
<div style="margin-bottom: 15px;"></div>
<?php
if(!empty($users)){
?>
    <table class="table table-striped table-bordered table-condensed">
        <?php 
            foreach($users as $use):
        ?>
        <tr>
            <td><?php echo  $use->id ?></td>
            <td><?php echo  $use->username ?></td>
            <td><?php echo  $use->email ?></td>
             <td>
                <?php echo anchor('administrator/user/index/edit/'.$use->id,'Profile', 'class="btn action"') ?>
            </td>
            <td>
            
            <?php
                if($use->banned)
                {
                     echo anchor('administrator/user/index/unbanned/'.$use->id,'<i class="icon-remove"></i> Unbanned', 'class="btn action" onclick="return confirm(\'Do you want to  unbanned this user?\')"');
                }
                else
                     echo anchor('administrator/user/index/banned/'.$use->id,'<i class="icon-remove"></i> Banned', 'class="btn action" onclick="return confirm(\'Do you want to banned this user?\')"') ?>
            </td>
            <td>
<?php echo anchor('administrator/user/index/delete/'.$use->id,'<i class="icon-remove"></i> Delete', 'class="btn action" onclick="return confirm(\'Do you want to delete this user?\')"') ?>
            </td>
        </tr>
        <?php endforeach; ?>
    </table>
<?php
}else{
    echo '<div class="alert alert-info"><h4 class="alert-heading">Thông báo!</h4>Chưa có user nào...</div>';
}
?></td></tr></table>
</div>